package com.example.myretrofit2.presenter;

import com.example.myretrofit2.Goods;
import com.example.myretrofit2.User;
import com.example.myretrofit2.httpMesholds.HttpMesholds;

import java.util.List;

import rx.Observable;
import rx.Subscriber;
//presenter节目主持人
public class GoodsPresenter extends HttpMesholds {
    public static void getGoods(Goods goods, Subscriber<List<Goods>> s){
        Observable<List<Goods>> observable = goodsService.getGoods(goods).map(new ResultFunc1<List<Goods>>());
        toSub(observable,s);
    }

    public static void getGoodsInfo(int goodsid,Subscriber<Goods> s){
        Observable<Goods> observable = goodsService.getGoodsInfo(goodsid).map(new ResultFunc1<Goods>());
        toSub(observable,s);
    }

}
